<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Sifteo SDK: Memory</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-style-overrides.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<center>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Sifteo SDK" src="sdk_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">
   &#160;<span id="projectnumber">v1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</center>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Home</span></a></li>
      <li><a href="pages.html"><span>Guides</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Memory</div>  </div>
</div><!--header-->
<div class="contents">

<p>Fast memory copy, fill, and CRC operations.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga20938d45e7d2889376bd3151c5a1ce44"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga20938d45e7d2889376bd3151c5a1ce44"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#ga20938d45e7d2889376bd3151c5a1ce44">Sifteo::bzero</a> (void *s, unsigned count)</td></tr>
<tr class="memdesc:ga20938d45e7d2889376bd3151c5a1ce44"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write 'n' zero bytes to memory. <br/></td></tr>
<tr class="separator:ga20938d45e7d2889376bd3151c5a1ce44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafdca5e1ec83357ad6f479ca0dc7d2770"><td class="memTemplParams" colspan="2"><a class="anchor" id="gafdca5e1ec83357ad6f479ca0dc7d2770"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:gafdca5e1ec83357ad6f479ca0dc7d2770"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__memory.html#gafdca5e1ec83357ad6f479ca0dc7d2770">Sifteo::bzero</a> (T &amp;s)</td></tr>
<tr class="memdesc:gafdca5e1ec83357ad6f479ca0dc7d2770"><td class="mdescLeft">&#160;</td><td class="mdescRight">One-argument form of bzero: Templatized to zero any fixed-size object. <br/></td></tr>
<tr class="separator:gafdca5e1ec83357ad6f479ca0dc7d2770"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7af0ed4b3c2dacc085e38eefc0fea0e8"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#ga7af0ed4b3c2dacc085e38eefc0fea0e8">Sifteo::crc32</a> (const void *bytes, unsigned count)</td></tr>
<tr class="memdesc:ga7af0ed4b3c2dacc085e38eefc0fea0e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate a 32-bit CRC over a block of memory.  <a href="#ga7af0ed4b3c2dacc085e38eefc0fea0e8">More...</a><br/></td></tr>
<tr class="separator:ga7af0ed4b3c2dacc085e38eefc0fea0e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5eb829f4a453aceafd8d69ba514b438f"><td class="memTemplParams" colspan="2"><a class="anchor" id="ga5eb829f4a453aceafd8d69ba514b438f"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:ga5eb829f4a453aceafd8d69ba514b438f"><td class="memTemplItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group__memory.html#ga5eb829f4a453aceafd8d69ba514b438f">Sifteo::crc32</a> (const T &amp;s)</td></tr>
<tr class="memdesc:ga5eb829f4a453aceafd8d69ba514b438f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Templatized version of <a class="el" href="group__memory.html#ga7af0ed4b3c2dacc085e38eefc0fea0e8" title="Calculate a 32-bit CRC over a block of memory.">crc32()</a> for fixed-size objects. <br/></td></tr>
<tr class="separator:ga5eb829f4a453aceafd8d69ba514b438f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf0e6dd04c49ce8b089eb67b5e3497406"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf0e6dd04c49ce8b089eb67b5e3497406"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#gaf0e6dd04c49ce8b089eb67b5e3497406">Sifteo::memcmp</a> (const uint8_t *a, const uint8_t *b, unsigned count)</td></tr>
<tr class="memdesc:gaf0e6dd04c49ce8b089eb67b5e3497406"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__memory.html#gaf0e6dd04c49ce8b089eb67b5e3497406" title="memcmp(), with an implicit 8-bit data width">memcmp()</a>, with an implicit 8-bit data width <br/></td></tr>
<tr class="separator:gaf0e6dd04c49ce8b089eb67b5e3497406"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaebe9db484758c2638b6cda53c5eadf46"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaebe9db484758c2638b6cda53c5eadf46"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#gaebe9db484758c2638b6cda53c5eadf46">Sifteo::memcmp8</a> (const uint8_t *a, const uint8_t *b, unsigned count)</td></tr>
<tr class="memdesc:gaebe9db484758c2638b6cda53c5eadf46"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__memory.html#gaf0e6dd04c49ce8b089eb67b5e3497406" title="memcmp(), with an implicit 8-bit data width">memcmp()</a>, with an explicit 8-bit data width <br/></td></tr>
<tr class="separator:gaebe9db484758c2638b6cda53c5eadf46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga81b5bc3aea892b0062149ef79b49804b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga81b5bc3aea892b0062149ef79b49804b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#ga81b5bc3aea892b0062149ef79b49804b">Sifteo::memcpy</a> (uint8_t *dest, const uint8_t *src, unsigned count)</td></tr>
<tr class="memdesc:ga81b5bc3aea892b0062149ef79b49804b"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__memory.html#ga81b5bc3aea892b0062149ef79b49804b" title="memcpy(), with an implicit 8-bit data width">memcpy()</a>, with an implicit 8-bit data width <br/></td></tr>
<tr class="separator:ga81b5bc3aea892b0062149ef79b49804b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6db109f78eb84f7d2a5a945d3057cd73"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6db109f78eb84f7d2a5a945d3057cd73"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#ga6db109f78eb84f7d2a5a945d3057cd73">Sifteo::memcpy</a> (uint16_t *dest, const uint16_t *src, unsigned count)</td></tr>
<tr class="memdesc:ga6db109f78eb84f7d2a5a945d3057cd73"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__memory.html#ga81b5bc3aea892b0062149ef79b49804b" title="memcpy(), with an implicit 8-bit data width">memcpy()</a>, with an implicit 16-bit data width <br/></td></tr>
<tr class="separator:ga6db109f78eb84f7d2a5a945d3057cd73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae3bb180ccf5530069af0c7c42c0ab50c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae3bb180ccf5530069af0c7c42c0ab50c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#gae3bb180ccf5530069af0c7c42c0ab50c">Sifteo::memcpy</a> (uint32_t *dest, const uint32_t *src, unsigned count)</td></tr>
<tr class="memdesc:gae3bb180ccf5530069af0c7c42c0ab50c"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__memory.html#ga81b5bc3aea892b0062149ef79b49804b" title="memcpy(), with an implicit 8-bit data width">memcpy()</a>, with an implicit 32-bit data width <br/></td></tr>
<tr class="separator:gae3bb180ccf5530069af0c7c42c0ab50c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga48b6d9063e4dfb57820cee19c8baa6cb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga48b6d9063e4dfb57820cee19c8baa6cb"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#ga48b6d9063e4dfb57820cee19c8baa6cb">Sifteo::memcpy16</a> (uint16_t *dest, const uint16_t *src, unsigned count)</td></tr>
<tr class="memdesc:ga48b6d9063e4dfb57820cee19c8baa6cb"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__memory.html#ga81b5bc3aea892b0062149ef79b49804b" title="memcpy(), with an implicit 8-bit data width">memcpy()</a>, with an explicit 16-bit data width <br/></td></tr>
<tr class="separator:ga48b6d9063e4dfb57820cee19c8baa6cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga68b47332aa14a3d4b904dc7df137a85a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga68b47332aa14a3d4b904dc7df137a85a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#ga68b47332aa14a3d4b904dc7df137a85a">Sifteo::memcpy32</a> (uint32_t *dest, const uint32_t *src, unsigned count)</td></tr>
<tr class="memdesc:ga68b47332aa14a3d4b904dc7df137a85a"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__memory.html#ga81b5bc3aea892b0062149ef79b49804b" title="memcpy(), with an implicit 8-bit data width">memcpy()</a>, with an explicit 32-bit data width <br/></td></tr>
<tr class="separator:ga68b47332aa14a3d4b904dc7df137a85a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga72d1fde88e4991e4c0c40f205da43b75"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga72d1fde88e4991e4c0c40f205da43b75"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#ga72d1fde88e4991e4c0c40f205da43b75">Sifteo::memcpy8</a> (uint8_t *dest, const uint8_t *src, unsigned count)</td></tr>
<tr class="memdesc:ga72d1fde88e4991e4c0c40f205da43b75"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__memory.html#ga81b5bc3aea892b0062149ef79b49804b" title="memcpy(), with an implicit 8-bit data width">memcpy()</a>, with an explicit 8-bit data width <br/></td></tr>
<tr class="separator:ga72d1fde88e4991e4c0c40f205da43b75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga966e943cfa47e31ee6a0c6ff72d9984d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga966e943cfa47e31ee6a0c6ff72d9984d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#ga966e943cfa47e31ee6a0c6ff72d9984d">Sifteo::memset</a> (uint8_t *dest, uint8_t value, unsigned count)</td></tr>
<tr class="memdesc:ga966e943cfa47e31ee6a0c6ff72d9984d"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__memory.html#ga966e943cfa47e31ee6a0c6ff72d9984d" title="memset(), with an implicit 8-bit data width">memset()</a>, with an implicit 8-bit data width <br/></td></tr>
<tr class="separator:ga966e943cfa47e31ee6a0c6ff72d9984d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaa84f4130fb117d2b7ec1dcc8e9bb702"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaaa84f4130fb117d2b7ec1dcc8e9bb702"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#gaaa84f4130fb117d2b7ec1dcc8e9bb702">Sifteo::memset</a> (uint16_t *dest, uint16_t value, unsigned count)</td></tr>
<tr class="memdesc:gaaa84f4130fb117d2b7ec1dcc8e9bb702"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__memory.html#ga966e943cfa47e31ee6a0c6ff72d9984d" title="memset(), with an implicit 8-bit data width">memset()</a>, with an implicit 16-bit data width <br/></td></tr>
<tr class="separator:gaaa84f4130fb117d2b7ec1dcc8e9bb702"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3dfb773e496f794f74c15db49c6256c3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3dfb773e496f794f74c15db49c6256c3"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#ga3dfb773e496f794f74c15db49c6256c3">Sifteo::memset</a> (uint32_t *dest, uint32_t value, unsigned count)</td></tr>
<tr class="memdesc:ga3dfb773e496f794f74c15db49c6256c3"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__memory.html#ga966e943cfa47e31ee6a0c6ff72d9984d" title="memset(), with an implicit 8-bit data width">memset()</a>, with an implicit 32-bit data width <br/></td></tr>
<tr class="separator:ga3dfb773e496f794f74c15db49c6256c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabf33fba18a28e7590c7d475a39b7e09e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gabf33fba18a28e7590c7d475a39b7e09e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#gabf33fba18a28e7590c7d475a39b7e09e">Sifteo::memset16</a> (uint16_t *dest, uint16_t value, unsigned count)</td></tr>
<tr class="memdesc:gabf33fba18a28e7590c7d475a39b7e09e"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__memory.html#ga966e943cfa47e31ee6a0c6ff72d9984d" title="memset(), with an implicit 8-bit data width">memset()</a>, with an explicit 16-bit data width <br/></td></tr>
<tr class="separator:gabf33fba18a28e7590c7d475a39b7e09e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaf02b169fa58e92f32128f94887dcfbd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaaf02b169fa58e92f32128f94887dcfbd"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#gaaf02b169fa58e92f32128f94887dcfbd">Sifteo::memset32</a> (uint32_t *dest, uint32_t value, unsigned count)</td></tr>
<tr class="memdesc:gaaf02b169fa58e92f32128f94887dcfbd"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__memory.html#ga966e943cfa47e31ee6a0c6ff72d9984d" title="memset(), with an implicit 8-bit data width">memset()</a>, with an explicit 32-bit data width <br/></td></tr>
<tr class="separator:gaaf02b169fa58e92f32128f94887dcfbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5fd69ce3663f4ac90701bb6b57875cf5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5fd69ce3663f4ac90701bb6b57875cf5"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__memory.html#ga5fd69ce3663f4ac90701bb6b57875cf5">Sifteo::memset8</a> (uint8_t *dest, uint8_t value, unsigned count)</td></tr>
<tr class="memdesc:ga5fd69ce3663f4ac90701bb6b57875cf5"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__memory.html#ga966e943cfa47e31ee6a0c6ff72d9984d" title="memset(), with an implicit 8-bit data width">memset()</a>, with an explicit 8-bit data width <br/></td></tr>
<tr class="separator:ga5fd69ce3663f4ac90701bb6b57875cf5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Fast memory copy, fill, and CRC operations. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga7af0ed4b3c2dacc085e38eefc0fea0e8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t Sifteo::crc32 </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculate a 32-bit CRC over a block of memory. </p>
<p>This is a hardware-accelerated implementation of a variant of the CRC-32 Cyclic Redundancy Check algorithm. You can use this to check data integrity, or as a simple hash function for applications that do <b>not</b> require a cryptographic hash.</p>
<p>The output of this function is equivalent to the following (slow) reference implementation: </p>
<pre class="fragment">uint32_t referenceCRC32(const uint8_t *bytes, int count)
{
    int32_t crc = -1;
    while (count &gt; 0)
    {
        uint8_t byte0 = count-- &gt; 0 ? *bytes++ : 0xFF;
        uint8_t byte1 = count-- &gt; 0 ? *bytes++ : 0xFF;
        uint8_t byte2 = count-- &gt; 0 ? *bytes++ : 0xFF;
        uint8_t byte3 = count-- &gt; 0 ? *bytes++ : 0xFF;

        int32_t word = (byte3 &lt;&lt; 24) | (byte2 &lt;&lt; 16) | (byte1 &lt;&lt; 8) | byte0;

        for (unsigned bit = 32; bit; --bit) {
            crc = (crc &lt;&lt; 1) ^ ((crc ^ word) &lt; 0 ? 0x04c11db7 : 0);
            word = word &lt;&lt; 1;
        }
    }
    return crc;
}
</pre><p>This library function works most efficiently when both 'bytes' and 'count' are both a multiple of 4, but neither condition is mandatory. If the length of memory is not a multiple of 32 bits, the result is identical to if the block had been padded to the next multiple of 32 bits with up to three 0xFF bytes. </p>

</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.3.1-->
<!-- start footer part -->
    <hr class="footer"/>
    <address class="footer">
        <p><a href="http://sifteo.com">Sifteo</a> SDK v1.0.0 <small>(see <a href="https://developers.sifteo.com/sifteosdk">all versions</a>)</small></p>
        <p>Last updated Wed Mar 27 2013, by <a href="http://www.stack.nl/~dimitri/doxygen">Doxygen</a></p>
    </address>
</body>
</html>
